local ldb = LibStub("LibDataBroker-1.1");
local wFPS = "|cffe1a500w|cff69ccf0FPS";
local Broker_wFPS = ldb:NewDataObject("Broker_wFPS", {
	type = "data source",
	text = "1000fps",
	value = 1000,
	suffix = "fps",
	icon = "interface\\addons\\broker_wfps\\img\\icon.tga",
	label = "|cffe1a500w|cff69ccf0FPS",
	OnClick = function(_,btn)
	
	end,
	OnTooltipShow = function(tooltip)
		tooltip:AddLine(wFPS);
	end,
})



local lastUp = 0
local OnUpdate = CreateFrame("Frame")
OnUpdate:SetScript("OnUpdate", function(self, elap)
	lastUp = lastUp + elap
	if (lastUp>0.5) then
		fps = math.floor(GetFramerate())
		Broker_wFPS.text = string.format("%d fps",fps);
		Broker_wFPS.value = fps;
		lastUp = lastUp - 0.5;
	end
end)